import {
  Controller,
  Get,
} from '@nestjs/common';
import { ApiOkResponse, ApiOperation, ApiTags } from '@nestjs/swagger';
import { GlobalConfigService } from './global-config.service';
import { GlobalConfigShowResult } from "@/module/global-config/global-config.result";

@Controller('/v1/global-configs')
@ApiTags('GlobalConfig')
export class GlobalConfigV1Controller {
  constructor(private readonly globalConfigService: GlobalConfigService) {
  }

  @Get('/unique')
  @ApiOperation({ summary: '获取配置' })
  @ApiOkResponse({ type: GlobalConfigShowResult })
  async show(): Promise<GlobalConfigShowResult> {
    const res = await this.globalConfigService.show();
    return res;
  }
}
